package main.canvas;


import java.awt.*;
import java.util.ArrayList;
import java.util.List;

public abstract class CanvasComponent {
    private List<CanvasComponent> children = new ArrayList<>();
    protected int x;
    protected int y;
    protected int width;
    protected int height;

    public abstract void draw(Graphics2D g);

    public List<CanvasComponent> getChildren() {
        return children;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }


    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }
}
